//
//  SRAttentionCollectionViewCell.m
//  Fitness
//
//  Created by SunZhongyuan on 2018/6/5.
//  Copyright © 2018年 SunZhongyuan. All rights reserved.
//

#import "SRAttentionCollectionViewCell.h"

@implementation SRAttentionCollectionViewCell

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        CGFloat imageWidth = 0.16*kScreenWidth;
        _topImage  = [[UIImageView alloc] initWithFrame:CGRectMake((self.bounds.size.width-imageWidth)/2, 0, imageWidth, imageWidth)];
        _topImage.layer.masksToBounds = YES;
        _topImage.layer.cornerRadius = imageWidth / 2;
        [self.contentView addSubview:_topImage];
        
        CGFloat labelWidth = imageWidth;
        CGFloat labelHeight = 0.03 * kScreenHeight;
        _botlabel = [[UILabel alloc] initWithFrame:CGRectMake((self.bounds.size.width-labelWidth)/2, CGRectGetMaxY(_topImage.frame)+5, labelWidth, labelHeight)];
        _botlabel.textAlignment = NSTextAlignmentCenter;
        _botlabel.textColor = [UIColor blackColor];
        _botlabel.font = font(14);
        [self.contentView addSubview:_botlabel];
    }
    
    return self;
}


@end
